unit Form_Main;

interface
uses
  Windows, Messages, SysUtils, Variants, Classes, ShellApi, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, RzTray;

type
  TFormMain = class(TForm)
    Btnx_1: TButton;
    Btnx_2: TButton;
    RzTrayIcon1: TRzTrayIcon;
    procedure Btnx_1Click(Sender: TObject);
    procedure Btnx_2Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
  public
  end;

var
  FormMain: TFormMain;
  gbCanClose: Boolean;

implementation

{$R *.dfm}


procedure TFormMain.Btnx_1Click(Sender: TObject);
begin
  ShowMessageFmt('%S',['HelloWorld,DelphiService']);
end;

procedure TFormMain.Btnx_2Click(Sender: TObject);
begin
  RzTrayIcon1.MinimizeApp;
end;

procedure TFormMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action:=caHide;
end;



end.
